package com.ly.mpayment.persist.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * DebitLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="debit_log"

)

public class DebitLog  implements java.io.Serializable {


    // Fields

     private String debitId;
     private DownShopInfo downShopInfo;
     private Date debitTime;
     private String debitStatus;
     private DownRechargeFlow downOrder;
     private BigDecimal debitAmount;
     private int status;
     private BigDecimal balance;

    // Constructors

    /** default constructor */
    public DebitLog() {
    }


    /** full constructor */
    public DebitLog(DownShopInfo downShopInfo, Date debitTime, String debitStatus, BigDecimal debitAmount) {
        this.downShopInfo = downShopInfo;
        this.debitTime = debitTime;
        this.debitStatus = debitStatus;
        this.debitAmount = debitAmount;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="debit_id", unique=true, nullable=false, length=36)
    public String getDebitId() {
        return this.debitId;
    }

    public void setDebitId(String debitId) {
        this.debitId = debitId;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="downshopuuid")

    public DownShopInfo getDownShopInfo() {
        return this.downShopInfo;
    }

    public void setDownShopInfo(DownShopInfo downShopInfo) {
        this.downShopInfo = downShopInfo;
    }

    @Column(name="debit_time", length=19)

    public Date getDebitTime() {
        return this.debitTime;
    }

    public void setDebitTime(Date debitTime) {
        this.debitTime = debitTime;
    }

    @Column(name="debit_status", length=10)

    public String getDebitStatus() {
        return this.debitStatus;
    }

    public void setDebitStatus(String debitStatus) {
        this.debitStatus = debitStatus;
    }

    @Column(name="debit_amount", precision=28, scale=5)

    public BigDecimal getDebitAmount() {
        return this.debitAmount;
    }

    public void setDebitAmount(BigDecimal debitAmount) {
        this.debitAmount = debitAmount;
    }

	@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="downorderuuid")
	public DownRechargeFlow getDownOrder() {
		return downOrder;
	}


	public void setDownOrder(DownRechargeFlow downOrder) {
		this.downOrder = downOrder;
	}


	@Column(name="status")
	public int getStatus() {
		return status;
	}


	public void setStatus(int status) {
		this.status = status;
	}

    @Column(name="balance", precision=28, scale=5)
    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }
}
